; (function () {
    // 样式库
    var kefu_style = '\
.kefu{position:fixed;right:8px;top:30%;z-index:99999}\
.kefu .kefu-main{width:48px;background:#fff;border:1px solid #F0F0F0;border-radius:4px;box-shadow:0 0 15px #e4e4e4;box-sizing:border-box}\
.kefu .kefu-main .kefu-item{border-bottom:1px solid #F0F0F0;position:relative;box-sizing:border-box;height:48px;line-height:48px;display:flex;align-items:center;justify-content:center}\
.kefu .kefu-main .kefu-item:hover{background:#e4e4e4}\
.kefu .kefu-main .kefu-item:hover svg{transform:scale(1.1)}\
.kefu .kefu-main .kefu-item:hover .kefu-item-tips{display:block}\
.kefu .kefu-main .kefu-item .kefu-item-tips{position:absolute;display:none;right:40px;height:48px}\
.kefu .kefu-main .kefu-item .kefu-item-tips .kefu-item-tips-main{width:126px;margin-right:16px;position:relative;font-size:14px;background:#FFFFFF;border:1px solid #F0F0F0;text-align:center;padding:4px;}\
.kefu .kefu-main .kefu-item .kefu-item-tips .kefu-item-tips-main img{width:100%}\
.kefu .kefu-main .kefu-item .kefu-item-tips .kefu-item-tips-main .arrow-right-out{width:0px;height:0px;border-style:solid;border-color:transparent transparent transparent #F0F0F0;border-width:8px;position:absolute;top:8px;right:-16px}\
.kefu .kefu-main .kefu-item .kefu-item-tips .kefu-item-tips-main .arrow-right-in{width:0px;height:0px;border-style:solid;border-color:transparent transparent transparent #FFFFFF;border-width:8px;position:absolute;top:8px;right:-13px}\
.kefu .kefu-main .kefu-item a{display: inherit;}';
    // 客服svg图片
    var kefu_svg = {
        home: '\
<svg t="1612235795179" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3884" width="24" height="24">\
    <path d="M987.136 399.23712l-93.06112-63.06816v-1.72032h-2.53952l-353.67936-239.68768a35.57376 35.57376 0 0 0-20.736-6.10304 35.55328 35.55328 0 0 0-20.74624 6.10304l-353.65888 239.68768h-2.53952v1.72032l-93.06112 63.06816a35.81952 35.81952 0 0 0-9.54368 49.7664 35.7888 35.7888 0 0 0 49.75616 9.56416l52.8384-35.80928v420.48512c0 56.54528 45.84448 102.4 102.4 102.4h549.10976c56.54528 0 102.4-45.85472 102.4-102.4v-420.48512l52.8384 35.80928a35.7888 35.7888 0 0 0 49.75616-9.56416 35.81952 35.81952 0 0 0-9.53344-49.7664z m-164.73088 444.01664c0 16.93696-13.78304 30.72-30.72 30.72h-549.10976c-16.93696 0-30.72-13.78304-30.72-30.72v-469.07392l305.27488-206.87872 305.27488 206.87872v469.07392z" fill="#d81e06" p-id="3885"></path><path d="M430.09024 481.3312a51.2 51.2 0 0 0-51.2 51.2v174.08a51.2 51.2 0 0 0 51.2 51.2h174.06976a51.2 51.2 0 0 0 51.2-51.2v-174.08a51.2 51.2 0 0 0-51.2-51.2h-174.06976z m153.58976 204.8h-133.10976v-133.12h133.10976v133.12z" fill="#d81e06" p-id="3886"></path>\
</svg>',
        kefu: '\
<svg t="1612160161501" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4259" width="24" height="24">\
    <path d="M634.5216 698.8288c1.024-5.0176-4.864-8.448-8.7552-5.12-18.5344 15.9232-58.7776 45.2096-104.2432 45.2096-46.7968 0-92.5184-17.3056-112.4352-25.9072-4.3008-1.8944-8.8064 2.3552-7.168 6.7584 8.1408 22.2208 35.3792 68.864 119.9616 68.864 84.5312-0.0512 106.8032-60.7744 112.64-89.8048z" fill="#d4237a" p-id="4260"></path>\
    <path d="M920.832 366.6944C876.9024 181.3504 710.144 43.008 511.5392 43.008c-198.5536 0-365.3632 138.3424-409.2928 323.6864-37.376 6.7072-65.7408 39.2704-65.7408 78.592v145.1008c0 44.1344 35.7888 79.9232 79.9232 79.9232 26.1632 0 49.2544-12.5952 63.8464-32 34.6112 86.272 103.6288 155.4432 190.4128 191.1296 5.9904 2.4576 10.5472-5.632 5.376-9.5232-58.2656-43.9808-114.9952-114.9952-111.104-223.7952 0-23.552 23.552-61.7472 71.5776-68.608 48.0256-6.8608 266.7008-2.9184 294.144-118.6304 5.888-31.3856 3.1232-54.7328 23.1936-38.5536 8.8064 7.68 76.8 84.6336 85.9648 210.1248 5.4784 75.4688-4.9152 157.696-61.3888 218.112-4.3008 4.608 1.3824 11.7248 6.7584 8.4992 69.2736-40.96 122.88-104.8576 150.016-180.992 8.96 17.8688 24.3712 31.8976 43.2128 39.0656-9.8304 39.936-31.3344 94.1568-78.4384 140.0832-58.0096 56.6272-141.3632 87.808-248.0128 92.928-10.1888-23.0912-33.2288-39.2704-60.1088-39.2704-36.2496 0-65.6896 29.3888-65.6896 65.6896 0 36.2496 29.3888 65.6896 65.6896 65.6896 27.4944 0 51.0464-16.9472 60.8256-40.9088 120.3712-5.5296 215.4496-41.5232 283.0336-107.4688 59.8528-58.4192 84.6336-127.2832 94.9248-175.2064 32.3584-10.1888 55.8592-40.448 55.8592-76.2368V445.2864c0.0512-39.2704-28.3136-71.8848-65.6896-78.592zM505.4464 168.3968c-150.6304 0-278.9888 93.7984-328.0896 225.2288a80.50176 80.50176 0 0 0-24.32-19.3536c40.0896-160.6656 185.6-280.064 358.5024-280.064s318.4128 119.3984 358.5024 280.064a80.05632 80.05632 0 0 0-32.512 31.0272C791.8592 267.776 660.48 168.3968 505.4464 168.3968z"fill="#d4237a" p-id="4261"></path>\
</svg>',
        qq: '\
<svg t="1612160876753" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5783" width="24" height="24">\
    <path d="M511.09761 957.257c-80.159 0-153.737-25.019-201.11-62.386-24.057 6.702-54.831 17.489-74.252 30.864-16.617 11.439-14.546 23.106-11.55 27.816 13.15 20.689 225.583 13.211 286.912 6.767v-3.061z"fill="#FAAD08" p-id="5784"></path>\
    <path d="M496.65061 957.257c80.157 0 153.737-25.019 201.11-62.386 24.057 6.702 54.83 17.489 74.253 30.864 16.616 11.439 14.543 23.106 11.55 27.816-13.15 20.689-225.584 13.211-286.914 6.767v-3.061z" fill="#FAAD08" p-id="5785"></path>\
    <path d="M497.12861 474.524c131.934-0.876 237.669-25.783 273.497-35.34 8.541-2.28 13.11-6.364 13.11-6.364 0.03-1.172 0.542-20.952 0.542-31.155C784.27761 229.833 701.12561 57.173 496.64061 57.162 292.15661 57.173 209.00061 229.832 209.00061 401.665c0 10.203 0.516 29.983 0.547 31.155 0 0 3.717 3.821 10.529 5.67 33.078 8.98 140.803 35.139 276.08 36.034h0.972z" fill="#000000" p-id="5786"></path>\
    <path d="M860.28261 619.782c-8.12-26.086-19.204-56.506-30.427-85.72 0 0-6.456-0.795-9.718 0.148-100.71 29.205-222.773 47.818-315.792 46.695h-0.962C410.88561 582.017 289.65061 563.617 189.27961 534.698 185.44461 533.595 177.87261 534.063 177.87261 534.063 166.64961 563.276 155.56661 593.696 147.44761 619.782 108.72961 744.168 121.27261 795.644 130.82461 796.798c20.496 2.474 79.78-93.637 79.78-93.637 0 97.66 88.324 247.617 290.576 248.996a718.01 718.01 0 0 1 5.367 0C708.80161 950.778 797.12261 800.822 797.12261 703.162c0 0 59.284 96.111 79.783 93.637 9.55-1.154 22.093-52.63-16.623-177.017" fill="#000000" p-id="5787"></path>\
    <path d="M434.38261 316.917c-27.9 1.24-51.745-30.106-53.24-69.956-1.518-39.877 19.858-73.207 47.764-74.454 27.875-1.224 51.703 30.109 53.218 69.974 1.527 39.877-19.853 73.2-47.742 74.436m206.67-69.956c-1.494 39.85-25.34 71.194-53.24 69.956-27.888-1.238-49.269-34.559-47.742-74.435 1.513-39.868 25.341-71.201 53.216-69.974 27.909 1.247 49.285 34.576 47.767 74.453" fill="#FFFFFF" p-id="5788"></path>\
    <path d="M683.94261 368.627c-7.323-17.609-81.062-37.227-172.353-37.227h-0.98c-91.29 0-165.031 19.618-172.352 37.227a6.244 6.244 0 0 0-0.535 2.505c0 1.269 0.393 2.414 1.006 3.386 6.168 9.765 88.054 58.018 171.882 58.018h0.98c83.827 0 165.71-48.25 171.881-58.016a6.352 6.352 0 0 0 1.002-3.395c0-0.897-0.2-1.736-0.531-2.498" fill="#FAAD08" p-id="5789"></path>\
    <path d="M467.63161 256.377c1.26 15.886-7.377 30-19.266 31.542-11.907 1.544-22.569-10.083-23.836-25.978-1.243-15.895 7.381-30.008 19.25-31.538 11.927-1.549 22.607 10.088 23.852 25.974m73.097 7.935c2.533-4.118 19.827-25.77 55.62-17.886 9.401 2.07 13.75 5.116 14.668 6.316 1.355 1.77 1.726 4.29 0.352 7.684-2.722 6.725-8.338 6.542-11.454 5.226-2.01-0.85-26.94-15.889-49.905 6.553-1.579 1.545-4.405 2.074-7.085 0.242-2.678-1.834-3.786-5.553-2.196-8.135" fill="#000000" p-id="5790"></path>\
    <path d="M504.33261 584.495h-0.967c-63.568 0.752-140.646-7.504-215.286-21.92-6.391 36.262-10.25 81.838-6.936 136.196 8.37 137.384 91.62 223.736 220.118 224.996H506.48461c128.498-1.26 211.748-87.612 220.12-224.996 3.314-54.362-0.547-99.938-6.94-136.203-74.654 14.423-151.745 22.684-215.332 21.927" fill="#FFFFFF" p-id="5791"></path>\
    <path d="M323.27461 577.016v137.468s64.957 12.705 130.031 3.91V591.59c-41.225-2.262-85.688-7.304-130.031-14.574" fill="#EB1C26" p-id="5792"></path>\
    <path d="M788.09761 432.536s-121.98 40.387-283.743 41.539h-0.962c-161.497-1.147-283.328-41.401-283.744-41.539l-40.854 106.952c102.186 32.31 228.837 53.135 324.598 51.926l0.96-0.002c95.768 1.216 222.4-19.61 324.6-51.924l-40.855-106.952z" fill="#EB1C26" p-id="5793"></path>\
</svg>',
        wechat: '\
<svg t="1612161260520" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9881" width="24" height="24">\
    <path d="M1010.8 628c0-141.2-141.3-256.2-299.9-256.2-168 0-300.3 115.1-300.3 256.2 0 141.4 132.3 256.2 300.3 256.2 35.2 0 70.7-8.9 106-17.7l96.8 53-26.6-88.2c70.9-53.2 123.7-123.7 123.7-203.3zM618 588.8c-22.1 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40c0 22-17.9 40-40 40z m194.3-0.3c-22.1 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40z" fill="#00C800" p-id="9882"></path>\
    <path d="M366.3 106.9c-194.1 0-353.1 132.3-353.1 300.3 0 97 52.9 176.6 141.3 238.4l-35.3 106.2 123.4-61.9c44.2 8.7 79.6 17.7 123.7 17.7 11.1 0 22.1-0.5 33-1.4-6.9-23.6-10.9-48.3-10.9-74 0-154.3 132.5-279.5 300.2-279.5 11.5 0 22.8 0.8 34 2.1C692 212.6 539.9 106.9 366.3 106.9zM247.7 349.2c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48z m246.6 0c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48z" fill="#00C800" p-id="9883"></path>\
</svg>',
        moble: '\
<svg t="1612161176166" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8815" width="24" height="24">\
    <path d="M532.5 191.5l17.3 61.9c66.9-22 143.4-6.4 196.7 46.9 49.3 49.3 62.4 127 47.2 190.1 15.8 6.2 41 13.9 60.5 21.9 22.2-87.2 6.9-189.8-61.5-258.2-70.5-70.4-171.4-90.5-260.2-62.6z" fill="#95CD5C" p-id="8816"></path>\
    <path d="M519.5 244.9c12.5 12.5 32.9 12.5 45.4 0s12.5-32.9 0-45.4-32.9-12.5-45.4 0-12.5 32.9 0 45.4zM686.6 482.9c12.5 12.5 32.9 12.5 45.4 0s12.5-32.9 0-45.4-32.9-12.5-45.4 0c-12.6 12.5-12.6 32.9 0 45.4zM567.1 363.4c12.5 12.5 32.9 12.5 45.4 0s12.5-32.9 0-45.4-32.9-12.5-45.4 0-12.5 32.8 0 45.4zM800.4 525.8c12.5 12.5 32.9 12.5 45.4 0s12.5-32.9 0-45.4-32.9-12.5-45.4 0c-12.5 12.6-12.5 32.9 0 45.4z" fill="#95CD5C" p-id="8817"></path>\
    <path d="M583.4 309l10.8 63.4c22-2.9 45.1 4.2 61.9 21 16.6 16.6 23.6 39.1 21.2 60.8l50.2 13.6c0.3-0.4 0.7-0.9 1.1-1.3 3.5-3.5 8.5-4.8 12.6-3.6 5.1-41-8.1-83.8-39.5-115.2C670 316 624.8 303.4 583.4 309z" fill="#95CD5C" p-id="8818"></path>\
    <path d="M850.9 772.5c1.4-2.5 2.5-5.3 3.2-8.2 3.8-13.3 5.8-27.4 5.8-42 0-85.4-69.2-154.7-154.7-154.7-72.5 0-133.3 49.9-150.1 117.2-95.6-42.7-169.8-125.3-200.9-227.1 66.4-17.4 115.5-77.7 115.5-149.6v-1.4c0-84.9-68.9-153.7-153.7-153.7-21.4 0-41.8 4.4-60.4 12.3-55.9 23.4-95.2 78.5-95.2 142.9 0 2.2 0.1 4.4 0.2 6.6-0.1 3.8-0.2 7.5-0.2 11.3 0 304.2 246.7 550 550.9 550 2.3 0 4.6-0.2 6.8-0.2 2.7-0.1 5.3-0.5 7.8-1.3 58.3-7.6 106.3-48 125-102.1z" fill="#95CD5C" p-id="8819"></path>\
</svg>',
        qrcode: '\
<svg t="1612161401111" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11228" width="24" height="24">\
    <path d="M318.93504 319.39584H225.55648V225.83296h93.37856v93.56288z m0 478.7712H225.55648v-93.56288h93.37856v93.56288z m479.50848-478.7712h-93.37856V225.83296h93.37856v93.56288z" fill="#515151" p-id="11229"></path>\
    <path d="M389.48864 463.36H155.32032A73.52832 73.52832 0 0 1 81.92 389.86752V155.41248A73.52832 73.52832 0 0 1 155.32032 81.92h234.16832a73.53344 73.53344 0 0 1 73.40544 73.49248v234.45504A73.53344 73.53344 0 0 1 389.48864 463.36zM155.32032 150.80448a4.608 4.608 0 0 0-4.608 4.608v234.45504a4.608 4.608 0 0 0 4.608 4.608h234.16832a4.608 4.608 0 0 0 4.608-4.608V155.41248a4.608 4.608 0 0 0-4.608-4.608H155.32032z m234.16832 790.65088H155.32032A73.52832 73.52832 0 0 1 81.92 867.95776v-234.45504a73.53344 73.53344 0 0 1 73.40032-73.49248h234.16832a73.53344 73.53344 0 0 1 73.40544 73.49248v234.45504a73.53344 73.53344 0 0 1-73.40544 73.4976z m-234.16832-312.56064a4.608 4.608 0 0 0-4.608 4.608v234.45504a4.608 4.608 0 0 0 4.608 4.608h234.16832a4.608 4.608 0 0 0 4.608-4.608v-234.45504a4.608 4.608 0 0 0-4.608-4.608H155.32032z m642.92864-71.05536v97.92h-100.32128v-97.92h-141.51168v141.69088h141.51168v51.2h-45.39392v45.45536h-96.11776V942.08h96.11776v-96.37376h100.32128v-94.976h45.39392V671.232h142.848v-113.39264h-142.848z m45.67552 288.00512h-91.06944V942.08H940.032v-191.34976h-96.10752V845.824z m24.74496-382.464h-234.1632a73.52832 73.52832 0 0 1-73.40032-73.49248V155.41248A73.52832 73.52832 0 0 1 634.50624 81.92h234.1632A73.53344 73.53344 0 0 1 942.08 155.41248v234.45504A73.52832 73.52832 0 0 1 868.66944 463.36z m-234.1632-312.576a4.608 4.608 0 0 0-4.608 4.608v234.45504a4.608 4.608 0 0 0 4.608 4.608h234.1632a4.608 4.608 0 0 0 4.608-4.608V155.41248a4.608 4.608 0 0 0-4.608-4.608h-234.1632z" fill="#515151" p-id="11230"></path>\
</svg>',
        top: '\
<svg t="1618199023801" class="icon" viewBox="0 0 1025 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1973" width="16" height="16">\
    <path d="M533.204945 247.840277c-11.435995-13.314876-30.184888-13.314876-41.620883 0l-342.378861 399.573165c-11.435995 13.319992-6.434858 24.25659 11.19346 24.25659l128.001279 0c17.621155 0 31.995203 14.379165 31.995203 32.007483l0 256.048609c0 17.626271 14.378142 32.00339 32.001343 32.00339l320.002175 0c17.628318 0 31.996226-14.378142 31.996226-32.00339L704.394887 703.678539c0-17.629342 14.376095-32.007483 32.005437-32.007483l127.999232 0c17.621155 0 22.624339-10.937621 11.185273-24.25659L533.204945 247.840277z" p-id="1974" fill="#2c2c2c"></path>\
    <path d="M192.395911 159.573836l640.002303 0c35.375346 0 64.00064-28.633481 64.00064-64.011897 0-35.382509-28.625294-64.011897-64.00064-64.011897l-640.002303 0c-35.371252 0-63.99757 28.629387-63.99757 64.011897C128.398341 130.940356 157.023635 159.573836 192.395911 159.573836z" p-id="1975" fill="#2c2c2c"></path>\
</svg>'
    }

    function kefu(option) {
        var opt = option || {}
        this.render(opt);
    }

    kefu.prototype = {
        constructor: this,
        // 写入head样式
        _initHead: function () {
            var head = document.getElementsByTagName('head')[0];
            var style = document.createElement('style');
            style.type = 'text/css';
            if (style.styleSheet) {
                style.styleSheet.cssText = kefu_style;
            } else {
                style.appendChild(document.createTextNode(kefu_style));
            }
            head.appendChild(style);
        },
        // 渲染html
        _initTmp: function (list, homeLink) {
            var html = [
                '<div class="kefu-item" id="kefu-home"><a href="' + homeLink + '" target="_blank">' + kefu_svg.home + '</a>\
                    <div class="kefu-item-tips">\
                        <div class="kefu-item-tips-main">\
                            <span class="arrow-right-out"></span>\
                            <span class="arrow-right-in"></span>\
                            <span>主页</span>\
                        </div>\
                    </div>\
                </div>',
                '<div class="kefu-item" id="kefu-kefu"><a href="javascript:void(0);">' + kefu_svg.kefu + '</a>\
                    <div class="kefu-item-tips">\
                        <div class="kefu-item-tips-main">\
                            <span class="arrow-right-out"></span>\
                            <span class="arrow-right-in"></span>\
                            <span>联系客服</span>\
                        </div>\
                    </div>\
                </div>'
            ]
            for (var name in list) {
                var item = list[name];
                if (!item || item == '') {
                    continue;
                }
                var content = '';
                switch (name) {
                    case 'moble':
                        content = '<a href="tel:' + item + '">' + kefu_svg[name] + '</a>\
                                    <div class="kefu-item-tips">\
                                        <div class="kefu-item-tips-main">\
                                            <span class="arrow-right-out"></span>\
                                            <span class="arrow-right-in"></span>\
                                            <span>'+ item + '</span>\
                                        </div>\
                                    </div>'
                        break;
                    case 'qq':
                        content = '<a href="tencent://message/?uin=' + item + '&Site=wendns.com&Menu=yes">' + kefu_svg[name] + '</a>\
                                    <div class="kefu-item-tips">\
                                        <div class="kefu-item-tips-main">\
                                            <span class="arrow-right-out"></span>\
                                            <span class="arrow-right-in"></span>\
                                            <span>'+ item + '</span>\
                                        </div>\
                                    </div>'
                        break;
                    case 'wechat':
                        content = kefu_svg[name] + '<div class="kefu-item-tips">\
                                        <div class="kefu-item-tips-main">\
                                            <span class="arrow-right-out"></span>\
                                            <span class="arrow-right-in"></span>\
                                            <div>\
                                                <img src="'+ item + '" alt="wechat">\
                                            </div>\
                                        </div>\
                                    </div>'
                        break;
                    case 'qrcode':
                        content = kefu_svg[name] + '<div class="kefu-item-tips">\
                                        <div class="kefu-item-tips-main">\
                                            <span class="arrow-right-out"></span>\
                                            <span class="arrow-right-in"></span>\
                                            <div>\
                                                <img src="'+ item + '" alt="qrcode">\
                                            </div>\
                                        </div>\
                                    </div>'
                        break;
                    default:
                        continue;
                        break;
                }

                var tmp = '<div class="kefu-item" id="kefu-' + name + '">' + content + '</div>'
                html.push(tmp)
            }
            // 判断是否需要回顶，补充在最后
            if (list.top) {
                var content = '<div class="kefu-item" id="kefu-top"><a href="javascript:void(0);">' + kefu_svg.top + '</a>\
                                    <div class="kefu-item-tips">\
                                        <div class="kefu-item-tips-main">\
                                            <span class="arrow-right-out"></span>\
                                            <span class="arrow-right-in"></span>\
                                            <span>回到顶部</span>\
                                        </div>\
                                    </div>\
                                </div>'
                html.push(content)
            }

            var view = '<div class="kefu"><div class="kefu-main">' + html.join('') + '</div></div>'
            document.getElementsByTagName("body")[0].insertAdjacentHTML('afterbegin', view)
        },
        // 渲染
        render: function (opt) {
            var that = this;
            this._initHead()
            this._initTmp(opt.showList, opt.home)
            document.querySelector('#kefu-kefu a').addEventListener('click', function () {
                // 设置新窗口的特性
                var features = "height=542, width=682, top=150, left=150, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no, titlebar=no";
                window.open(opt.url, '_blank', features);
            })
            document.querySelector('#kefu-top a') && document.querySelector('#kefu-top a').addEventListener('click', function () {
                that.backTop(0, 600)
            })
        },
        // 回顶
        backTop: function (number, time) {
            var that = this;
            var spacingTime = 20; // 设置循环的间隔时间  值越小消耗性能越高
            if (!time) {
                document.body.scrollTop = document.documentElement.scrollTop = number;
                return number;
            }
            // 计算循环的次数
            var spacingInex = time / spacingTime;
            // 获取当前滚动条位置
            var nowTop = document.body.scrollTop + document.documentElement.scrollTop;
            // 计算每次滑动的距离
            var everTop = (number - nowTop) / spacingInex;
            var scrollTimer = setInterval(() => {
                if (spacingInex > 0) {
                    spacingInex--;
                    that.backTop((nowTop += everTop));
                } else {
                    // 清除计时器
                    clearInterval(scrollTimer);
                }
            }, spacingTime);
        }
    }
    new kefu({
        app: '<?php echo $info["name"];?>',
        url: '<?php echo $container->url->build("/chat/client/" . $info["name"], [], true) ?>',
        home: '<?php echo $info["home"] ?>',
        showList: JSON.parse('<?php echo json_encode($showList); ?>')
    })
})(window);

